import { RouteRecordRaw } from 'vue-router'
/* AuthState */
export interface AuthState {
  authRoutes: RouteRecordRaw[]
  authLeftMenus: RouteRecordRaw[]
  authMenus: RouteRecordRaw[]
}

/* AppState */
export interface AppState {
  activeTopMenuPath: string
  isCollapse: boolean
  language: string
}

/* UserState */
export interface UserState {
  token: string | undefined
  name: string
  avatar: string
  nickname: string
  userId: string | number
  tenantId: string
  roles: string[]
  permissions: string[]
}

/* SettingState */
export interface SettingState {
  layout: LayoutType
  breadcrumb: boolean
  breadcrumbIcon: boolean
  footer: boolean
  isDark: boolean
  primary: string
  asideInverted: boolean
  headerInverted: boolean
  showTaps: boolean
  tagsViewIcon: boolean
}

/* TagsViewState */
export interface TagsViewState {
  visitedViews: TagView[]
  cachedViews: string[]
  selectedTag?: TagView
}
export interface TagView {
  /** 页签名称 */
  name: string
  /** 页签标题 */
  title: string
  /** 页签路由路径 */
  path: string
  /** 页签路由完整路径 */
  fullPath: string
  /** 页签图标 */
  icon?: string
  /** 是否固定页签 */
  affix?: boolean

  /** 隐藏标签 */
  noTagsView?: boolean
  /** 是否开启缓存 */
  keepAlive?: boolean
  /** 路由查询参数 */
  query?: any
}
